Loading TOC...

MarkLogic 10 Product Documentation
POST /manage/v2/databases/{id|name}/flexrep/configs

Summary

This resource address creates a flexible push replication configuration, along with the indexes needed for CPF-based flexible replication on the specified database. For an example, see Creating a Replication Configuration Element in the Scripting Administrative Tasks Guide.

URL Parameters
format The format of the request body. Can be either html, json, or xml (default). This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic Server returns status code 201 (Created). If the payload is malformed or the database does not exist, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires the manage-admin role, or the following privileges:

http://marklogic.com/xdmp/privileges/manage

http://marklogic.com/xdmp/privileges/manage-admin

Usage Notes

The flexible push replication properties are as follows. The domain-name property specifies the replication domain for the documents to be replicated. The alerting-uri property is optional.

domain-name

The domain id.

alerting-uri

Example



curl -X POST  --anyauth --user admin:admin --header "Content-Type:application/json" \
-d '{"domain-name": "myDomain", "alerting-uri": "http://otherserver.org/doIt"}' \
http://localhost:8002/manage/v2/databases/Foo/flexrep/configs

==> Sets the domain name and alerting URI in the flexible replication 
    configuration for the Foo database.
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.